package com.yc.c118s3plyqnzf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * 
 * </p>
 *
 * @author lcx
 * @since 2022-11-28
 */
@TableName("qnzf_house")
public class House implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "ID", type = IdType.AUTO)
      private Integer id;

      @TableField("uid")
    private Integer userId;

    @TableField("tid")
    private Integer typeId;

    @NotEmpty(message = "标题不能为空")
    private String title;

    @TableField("intro")
    @NotEmpty(message = "房屋介绍不能为空")
    private String description;

    @Min(value = 0, message = "价格必须大于0")
    private Integer price;

    private LocalDate pubdate;

    @Min(value = 0, message = "面积必须大于0")
    private Integer floorage;

    @NotEmpty(message = "联系方式不能为空")
    private String contact;

    @TableField("sid")
    private Integer streetId;
    
    public Integer getId() {
        return id;
    }

      public void setId(Integer id) {
          this.id = id;
      }
    
    public Integer getUserId() {
        return userId;
    }

      public void setUserId(Integer userId) {
          this.userId = userId;
      }
    
    public Integer getTypeId() {
        return typeId;
    }

      public void setTypeId(Integer typeId) {
          this.typeId = typeId;
      }
    
    public String getTitle() {
        return title;
    }

      public void setTitle(String title) {
          this.title = title;
      }
    
    public String getDescription() {
        return description;
    }

      public void setDescription(String description) {
          this.description = description;
      }
    
    public Integer getPrice() {
        return price;
    }

      public void setPrice(Integer price) {
          this.price = price;
      }
    
    public LocalDate getPubdate() {
        return pubdate;
    }

      public void setPubdate(LocalDate pubdate) {
          this.pubdate = pubdate;
      }
    
    public Integer getFloorage() {
        return floorage;
    }

      public void setFloorage(Integer floorage) {
          this.floorage = floorage;
      }
    
    public String getContact() {
        return contact;
    }

      public void setContact(String contact) {
          this.contact = contact;
      }
    
    public Integer getStreetId() {
        return streetId;
    }

      public void setStreetId(Integer streetId) {
          this.streetId = streetId;
      }

    @Override
    public String toString() {
        return "House{" +
              "id = " + id +
                  ", userId = " + userId +
                  ", typeId = " + typeId +
                  ", title = " + title +
                  ", description = " + description +
                  ", price = " + price +
                  ", pubdate = " + pubdate +
                  ", floorage = " + floorage +
                  ", contact = " + contact +
                  ", streetId = " + streetId +
              "}";
    }
}
